//@author A0097013L
package gui;

import java.util.ArrayList;
import java.util.Observable;
import java.util.Observer;

import memory.GenericEvents;

public class ObserverList extends Observable{
	public ArrayList<GenericEvents> memory = new ArrayList<GenericEvents>();
	public ArrayList<Observer> observerList = new ArrayList<Observer>();
	
	//Quick view lists
    public GenericList taskList;
    
    public ObserverList() {
    	taskList = new GenericList();
    	addUIs(taskList);
    	
 
    }
    
	private void addUIs(GenericList list) {
		observerList.add(list);
	}
	
	public void notifyUIs(String type) {  
        for (Observer o : observerList) {  
            o.update(this, type);  
        }  
	}
}
